from django.template import Template, Context

raw_template='''<html><head><title> {{keyword}} </title></head><body> 
{% for item in movie_list %}
<a href="{{item.url}}">{{item.movie}}</a><a>\tAverage Rate:{{item.rate}}</a><br>
{% endfor %}
</body></html>
'''

tpl = Template(raw_template)

def Render(keyword,args):
	#print len(args)
	ctx = Context({'keyword':keyword, 'movie_list':args})
	
	return tpl.render(ctx)




